// import { defineConfig } from 'vite-plugin-windicss'
import { defineConfig } from 'windicss/helpers'

export default defineConfig({
  darkMode: 'class',
  preflight: true,//默认true，样式重置
  safelist: [
    range(3).map(i => `p-${i}`), // p-1 to p-3
    range(10).map(i => `mt-${i}`), // mt-1 to mt-10
  ],
  extract:{
    exclude: ["node_modules", ".git"],//默认已排除
  },
  attributify: {//启用属性模式
    prefix: 'w:',
  },
})

function range(size:number, startAt = 1) {
    return Array.from(Array(size).keys()).map(i => i + startAt)
}
  